home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / cli / 0utils.lha / 0Utils / Close.data < prev    next >
Text File  |  1995-08-19  |  1KB  |  66 lines

  1.  
  2. #ifdef TPLTER
  3.  
  4. Close = {
  5.  
  6.     Short = {{ Close a filehandle }};
  7.     description = {{
  8.     Closes an AmigaDOS Filehandle previously
  9.     opened with the 'Open' command.
  10.     It does no checks to the given Filehandle,
  11.     so it should be used carefully.
  12.     The Filehandle must not be used after
  13.     calling Close on it.
  14.  
  15.     RESULT
  16.     -/-
  17.     }};
  18.  
  19.     NOTES = {{
  20.     ! Close is highly dangerous! Do not Use it, if !
  21.     ! U do not exactly know what U are doing!      !
  22.     }};
  23.  
  24.     EXAMPLES = {{
  25.     > set fh `Open Sys:S/Shell-startup`
  26.     > Readln $fh
  27.       alias xcopy "copy clone "
  28.     > Close $fh
  29.     > Unset fh
  30.     }};
  31.  
  32.     HISTORY = {{
  33.     21-02-95 b_noll created
  34.     21-02-95 b_noll added version/format-prefix/offset
  35.     20-03-95 b_noll added args diagnostics
  36.     19-08-95 b_noll created .data file
  37.     }};
  38.  
  39.     Template = "FILEHANDLE/N/A";
  40.     Arguments = {{
  41.     BPTR *filehandle;
  42.     }};
  43.  
  44.     version =  "1.1";
  45.  
  46.     body = {{
  47.         if (argv->filehandle && *argv->filehandle) {
  48.         if (Close (*argv->filehandle)) {
  49.             retval = RETURN_OK;
  50.         } else {
  51.             //PrintFault (IoErr(), GetArgStr());
  52.             retval = RETURN_ERROR;
  53.         } /* if */
  54.         } else {
  55.         SetIoErr(ERROR_BAD_NUMBER);
  56.         retval = RETURN_ERROR;
  57.         } /* if */
  58.  
  59.     }};
  60.  
  61. };
  62.  
  63. #endif
  64.  
  65.  
  66.